import { config } from '@/config'
import { http } from '@/utils/request'

export interface ILogin {
    phone: string
    smsCode: string
    devid: string
    devName: string
}

export async function HttpLogin(data: ILogin) {
    return http({
        url: config.api + '/user/login',
        data,
    })
}
export async function HttpLoginOut() {
    return http({
        url: config.api + '/user/loginout',
    })
}
export async function HttpGetToken() {
    return http({
        url: config.api + '/user/getToken',
    })
}
export async function HttpGetSmsCode(data: { phone: string }) {
    return http({
        url: config.api + '/sms/sendCode',
        data,
    })
}
export async function HttpGetMyInfo() {
    return http({
        url: config.api + '/user/getMyInfo',
    })
}
